# $Id$
# Maintainer: Ray Rashif <schiv@archlinux.org>
# Contributor: damir <damir@archlinux.org>

pkgname=fluidsynth
pkgver=1.1.6
pkgrel=5
pkgdesc="A real-time software synthesizer based on the SoundFont 2 specifications"
arch=('i686' 'x86_64')
url="http://www.fluidsynth.org/"
depends=('jack' 'libpulse')
makedepends=('cmake' 'ladspa' 'doxygen')
optdepends=('pulseaudio: PulseAudio sound support')
license=('LGPL')
backup=("etc/conf.d/$pkgname")
install=$pkgname.install
source=("http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz"
        'fluidsynth.systemd'
        'fluidsynth.conf')
md5sums=('ae5aca6de824b4173667cbd3a310b263'
         'ba5e2c71a98d593339e1460c60b0951c'
         '2167e6a7e38ed29399d77179072548f2')

build() {
  cd "$srcdir/$pkgname-$pkgver"

  cmake . -DCMAKE_INSTALL_PREFIX=/usr \
          -DCMAKE_BUILD_TYPE=Release \
          -Denable-ladspa=ON \
          -DLIB_SUFFIX=""
  make
}

package() {
  cd "$srcdir/$pkgname-$pkgver"

  make DESTDIR="$pkgdir" install

  install -Dm644 "$srcdir/$pkgname.systemd" \
    "$pkgdir/usr/lib/systemd/system/$pkgname.service"

  install -Dm644 "$srcdir/$pkgname.conf" \
    "$pkgdir/etc/conf.d/$pkgname"
}

# vim:set ts=2 sw=2 et:
